<template>
    <div>
        <a href="https://localhost:7174/api/Member/DownLoadExcelMember">导出XXX表数据</a>


        <hr>
        <h1>导入页面上要设计上传功能</h1>
        <input type="file" @change="upload" >
    </div>
</template>

<script setup lang="ts">
import axios from 'axios';


const upload=(e:any)=>{
    //取文件，打包装，把文件存到包装里
    debugger
    var f = e.target.files[0];
    var fd = new FormData();
    fd.append("file",f);

    axios.post("https://localhost:7174/api/Member/ImportExcelMember",fd).then(res=>{
        if(res.data>0){
            alert('导入成功')
        }
        else{
            alert('导入失败了。。。。。')
        }
    })

}

</script>

<style scoped>

</style>